import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
    mode: 'history',
    base: process.env.BASE_URL,
    routes: [
        {
            path: '/hot',
            name: 'hot',
            // route level code-splitting
            // this generates a separate chunk (about.[hash].js) for this route
            // which is lazy-loaded when the route is visited.
            component: () => import(/* webpackChunkName: "about" */ './views/hot.vue'),
            meta: {
                title: '热门'
            }
        },
        {path: '/song', name: 'song', component: () => import('./views/song.vue')},
        {
            path: '/discover',
            alias: '/',
            component: () => import(/* webpackChunkName: "about" */ './views/discover.vue'),
            meta: {
                title: 'Vue Music'
            },
            children: [
                {
                    path: '', component: () => import('./views/recommend.vue'),
                    meta: {
                        title: 'Vue Music'
                    },
                },
                {path: 'toplist', name: 'toplist', component: () => import('./views/toplist.vue')},
                {path: 'playlist', name: 'playlist', component: () => import('./components/bannerMyself.vue')},
                {path: 'djradio', name: 'djradio', component: () => import('./views/toplist.vue')}
            ]
        }
    ]
})
